﻿
@using Abp.Extensions
@using Abp.Application.Services.Dto
@using KDS.Mes.Web.Models.Common.Modals
@using KDS.Mes.Web.Models.Workshop

@model CreateOrEditWorkshopModalViewModel

@* 初始化头部 *@
@Html.Partial("~/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("EditWorkshop") + ": " + Model.Workshop.FactoryId) : L("CreateWorkshop")))


<!--html代码区域-->
<div class="modal-body">
    <form name="workshopInformationsForm" role="form" novalidate class="form-validation">
        <input type="hidden" name="Id" value="@Model.Workshop.Id" />
        <div>


            <div hidden="hidden">
                @if (Model.IsEditMode)
            {
                    <input type="hidden" name="Id" value="@Model.Workshop.Id" />
                }
            </div>



            <div class="form-group ">
                <label for="factoryIdEdit">@L("FactoryId")</label>
                @Html.DropDownList("FactoryId", Model.Factorys.Select(a => a.ToSelectListItem()), new
           {
               @class = "form-control selectpicker",
               data_live_search = "true",
               title = L("PlaaseSelect"),
               id = "factoryIdEdit"
           })
            </div>

            <div class="form-group">
                <label>@L("WorkshopName")   <span class="required"> * </span>	 	</label>
                <input class="maxlength-handler form-control @(Model.Workshop.WorkshopName.IsNullOrEmpty() ? "" : " edited")" type="text" name="WorkshopName" value="@Model.Workshop.WorkshopName" required maxlength="20" />
            </div>
            <div class="form-group">
                <label>@L("WorkshopCode")   <span class="required"> * </span>	 	</label>
                <input class="maxlength-handler form-control @(Model.Workshop.WorkshopCode.IsNullOrEmpty() ? "" : " edited")" type="text" name="WorkshopCode" value="@Model.Workshop.WorkshopCode" required maxlength="20" />
            </div>


        </div>
    </form>
</div>
@Html.Partial("~/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")

